﻿<Views:ViewPage
    x:Class="SecureBox.UI.StartupViewPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" 
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:SecureBox.Controls;assembly=SecureBox.Controls" 
    xmlns:Lists="clr-namespace:SecureBox.Controls.Lists;assembly=SecureBox.Controls" 
    xmlns:Views="clr-namespace:PhoneCore.Framework.Views;assembly=PhoneCore.Framework" xmlns:Command1="clr-namespace:PhoneCore.Framework.Views.Command;assembly=PhoneCore.Framework" mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    DataContext="{Binding Startup, Source={StaticResource Locator}}"
    x:Name="root"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <controls:Panorama Title="secure box">
            <controls:Panorama.Background>
                <ImageBrush ImageSource="/Resources/Images/StartupBackground.jpg"/>
            </controls:Panorama.Background>
            <controls:PanoramaItem Header="navigation" HorizontalAlignment="Left">
                <Grid Margin="0,0,0,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="30" />
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Vertical"  Grid.Row="0"  toolkit:TiltEffect.IsTiltEnabled="True">
                       <!-- <local:ImageTextButtonControl ImageSource="/Resources/Images/MainMenu/Library.png" Text="my secrets" FontSize="40" ImageHeight="62" ImageWidth="62" TextMargin="20,-20,0,0">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <Command:ExecuteCommandAction 
                                    Command="{Binding GoTo}" CommandParameterValue="Library" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </local:ImageTextButtonControl>-->
                        <local:ImageTextButtonControl ImageSource="/Resources/Images/MainMenu/Search.png" Text="my secrets" FontSize="50" ImageHeight="62" ImageWidth="62" TextMargin="20,-20,0,0">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <Command1:ExecuteCommandAction 
                                    Command="{Binding GoTo}" CommandParameter="Search" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </local:ImageTextButtonControl>
                        <local:ImageTextButtonControl ImageSource="/Resources/Images/MainMenu/Settings.png" Text="settings" FontSize="50" ImageHeight="62" ImageWidth="62" TextMargin="20,-20,0,0">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <Command1:ExecuteCommandAction 
                                    Command="{Binding GoTo}" CommandParameter="Settings" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </local:ImageTextButtonControl>
                        <local:ImageTextButtonControl ImageSource="/Resources/Images/MainMenu/Help.png" Text="help" FontSize="50" ImageHeight="62" ImageWidth="62" TextMargin="20,-20,0,0">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Click">
                                    <Command1:ExecuteCommandAction 
                                    Command="{Binding GoTo}" CommandParameter="Help" />
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                        </local:ImageTextButtonControl>
                    </StackPanel>
                    <TextBlock Text="{Binding ProductVersion}" 
                               Style="{StaticResource PhoneTextSmallStyle}"
                               Grid.Row="1" HorizontalAlignment="Right" />
                </Grid>
            </controls:PanoramaItem>
            <controls:PanoramaItem Header="templates" x:Name="Templates" HorizontalAlignment="Left">
                <ScrollViewer>
                    <ItemsControl ItemsSource="{Binding Templates}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <local:ImageTextButtonControl ImageSource="{Binding ImageUrl}" Text="{Binding Name}" FontSize="50" ImageHeight="128" ImageWidth="128" TextMargin="20,0,0,0">
                                    <local:ImageTextButtonControl.Resources>
                                        <Lists:DataContextProxy x:Key="DataContextProxy" BindingMode="OneWay" BindingPropertyName="Name"/>
                                    </local:ImageTextButtonControl.Resources>
                                    <i:Interaction.Triggers>
                                        <i:EventTrigger EventName="Click">
                                            <Command1:ExecuteCommandAction 
                                             Command="{Binding Path=DataContext.GoTo, ElementName=root}" CommandParameter="{Binding Path=DataSource, Source={StaticResource DataContextProxy}}" />
                                        </i:EventTrigger>
                                    </i:Interaction.Triggers>
                                </local:ImageTextButtonControl>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </ScrollViewer>
            </controls:PanoramaItem>
            <controls:PanoramaItem Header="synchronize" HorizontalAlignment="Left">
                <toolkit:WrapPanel Orientation="Vertical" Margin="24,0,0,0">
                    <Border Width="200" Height="200" Opacity="0.8">
                        <Border.Background>
                            <ImageBrush ImageSource="/Resources/Images/Sync/SkyDrive.png"/>
                        </Border.Background>
                    </Border>
                </toolkit:WrapPanel>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>
</Views:ViewPage>